
import java.util.*;
class Solution{
    /**
     * 最长回文子串
     *https://www.nowcoder.com/practice/b4525d1d84934cf280439aeecc36f4af?tpId=182&tqId=34752&ru=/exam/oj
     */
    public int getLongestPalindrome (String A) {

        int n = A.length(),ret = 1,left,right;
        for(int i = 0;i < n;i++){
            //1.奇数情况下
            left = i - 1; right = i + 1;
            while(left >=0 && right < n && A.charAt(left) == A.charAt(right)){

                left--;
                right++;

            }
            ret = Math.max(ret,right - left - 1);
            //2.偶数情况下
            left = i;right = i + 1;
            while(left >= 0 && right < n && A.charAt(left) == A.charAt(right)){

                left--;
                right++;
            }
            ret = Math.max(ret,right - left - 1);

        }
        return ret;
    }

    /**
     * 股票卖出最大值
     *https://www.nowcoder.com/practice/351b87e53d0d44928f4de9b6217d36bb?tpId=230&tqId=39767&ru=/exam/oj
     */
    public static void main2(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int ret = 0,preMin = in.nextInt();
        for(int i = 1;i < n;i++){
            int x = in.nextInt();
            ret = Math.max(ret,x - preMin);
            preMin = Math.min(preMin,x);
        }

        System.out.println(ret < 0 ? 0 : ret);
    }

    /**
     * 最短路劲问题
     * https://www.nowcoder.com/practice/cc1a9bc523a24716a117b438a1dc5706?tpId=230&tqId=40428&ru=/exam/oj
     * @param args
     */
    public static void main(String[] args)
    {
        Scanner in = new Scanner(System.in);

        //1.输入
        int n = in.nextInt(),m = in.nextInt(),x = in.nextInt() + 1,y = in.nextInt() + 1;

        //2.创建dp表格
        long[][] dps = new long[n + 2][m + 2];

        //初始化首位
        dps[0][1] = 1;

        //3.遍历
        for(int i = 1;i <= n + 1;i++)
        {
            for(int j = 1;j <= m + 1;j++)
            {
                //3.1 遇到马点
                if(i != x && j != y && Math.abs(i - x) + Math.abs(j - y) == 3 || i == x && y == j)
                {
                    dps[i][j] = 0;
                }
                //3.2 不是马点
                else
                {
                    dps[i][j] = dps[i-1][j] + dps[i][j -1];
                }
            }
        }

        System.out.println(dps[n + 1][m + 1]);
    }


}